package chapter9.rent.domain;
//House实体类
public class House {
private int id ;
private String owner;
private String phoneNumber;
private String address;
private int rent;
private String state;

    public House(int id, String owner, String phoneNumber, String address, int rent, String state) {
        this.id = id;
        this.owner = owner;
        this.phoneNumber = phoneNumber;
        this.address = address;
        this.rent = rent;
        this.state = state;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getRent() {
        return rent;
    }

    public void setRent(int rent) {
        this.rent = rent;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }
//重写toString方法,输出一个对象时会默认调用该方法
    @Override
    public String toString() {
        return id +
                "\t" + owner+
                "\t" + phoneNumber+
                "\t"  + address+
                "\t" + rent+
                "\t" + state ;
    }
}
